#include "linklist.h"

int main(int argc, char const *argv[])
{
    // a. 搞一个空的链表
    linklist gz2519 = init_list();

    // b. 放入若干学生节点
    student Jack = {21, "Jack", 76.0};
    student Rose = {24, "Rose", 67.0};
    student Mike = {23, "Mike", 99.0};

    list_add_tail(gz2519, new_node(&Jack));
    list_add_tail(gz2519, new_node(&Rose));
    list_add_tail(gz2519, new_node(&Mike));

    // c. 遍历输出这些学生信息
    list_for_each(gz2519);

    // d. 销毁链表释放资源
    destroy(gz2519);
    // free(gz2519);
    // gz2519 = NULL;

    return 0;
}
